# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-copr
pkgver=1.124
pkgrel=1
pkgdesc="Python interface for Copr"
url="https://github.com/fedora-copr/copr"
license=('GPL')
arch=('any')
depends=('python-filelock' 'python-marshmallow' 'python-requests' 'python-requests-toolbelt'
         'python-setuptools' 'python-six' 'python-munch' 'python-future')
checkdepends=('python-pytest' 'python-requests-gssapi')
source=("https://github.com/fedora-copr/copr/archive/python-copr-$pkgver-1.tar.gz")
sha512sums=('c163249b0e5fc8d640b6145f56bd1d190cbe338c99d8c78940c39700105faaef176ee548450b41c96b562d732f02b9d7b3126a666630a3c687ebcb6e426e41d3')

build() {
  cd copr-python-copr-$pkgver-1/python
  python setup.py build
}

check() {
  cd copr-python-copr-$pkgver-1/python
  python -m pytest
}

package() {
  cd copr-python-copr-$pkgver-1/python
  python setup.py install --root="$pkgdir" --optimize=1
}
